<%@ page language="java" contentType="text/html;"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<h1>
Welcome ${sessionScope.role }
</h1>
<br />${sessionScope.error}
<body>
	<html:form action="Registering">
		<fieldset>
			<legend>Authentication: </legend>
			First Name:
			<html:text property="first_name" />
			Last Name:
			<html:text property="last_name" />
			<br />
			<c:if test="${sessionScope.role=='Customer'}">
			Passcode: <html:text property="passcode" />
				<br />
			Security Question: ${sessionScope.user.security_question}<br />
			Security Answer: <html:text property="security_answer" />
			</c:if>
		</fieldset>
		<fieldset>
			<legend>Register:</legend>
			New Username:
			<html:text property="username" />
			Password:
			<html:text property="password" />
			Confirm Password:
			<html:text property="cpassword" />
		</fieldset>
		<html:submit property="submit" value="Submit" />
	</html:form>
</body>

</html>